package br.mywallet.data;

import android.content.Context;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelper;
import android.util.Log;

public class SQLiteHelper extends SQLiteOpenHelper{
	private String[] scriptCreate;

	public SQLiteHelper(Context context, String name,int version,String[] _scriptCreate) {	
		super(context, name, null, version);	
		scriptCreate = _scriptCreate;
	}


	@Override
	public void onCreate(SQLiteDatabase db) {
		Log.i("SQLiteHelper", "Create Inicio");
		
		for (int i = 0;i<scriptCreate.length;i++){
			db.execSQL(scriptCreate[i]);
			Log.i("SQLiteHelper", scriptCreate[i]);
		}
		
		Log.i("SQLiteHelper", "Create Fim");
	}


	@Override
	public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {

	}
}
